import Vue from 'vue'
import Router from 'vue-router'

/* 布局 */
import Layout from '@/views/Teacher/Layout'

Vue.use(Router)

export const constantRouterMap = [
    // {
    //     path: '',
    //     component: () => import('@/views/login'),
    //     redirect: '/login'
    // },
    {
        path: '/login',
        component: () => import ('@/views/login'),
        name: '登录',
        hidden: true
    },
    {
        path: '/skill',
        component: () => import ('@/views/administrator/CreateSkills'),
        name: '登录',
        hidden: true
    },
    {
        path: '',
        component: () => import ('@/views/Teacher/Layout'),
        redirect: 'index',
        children: [
            // 首页
            {
                path: '',
                component: () => import('@/views/Teacher/LayoutHome'),
                redirect: 'index',
                children: [{
                    path: 'index',
                    component: () =>import('@/views/Teacher/Index'),
                    name: 'index',
                    meta: {
                        title: '首页'
                    }
                }]
            },
            {
                path: 'AddClass',
                component: () => import ('@/views/Teacher/IndexView/AddClass'),
                name: 'AddClass',
                meta: {
                    title: '添加班级'
                }
            },
            // 我的课程 wty
            {
                path: '/MyCourses',
                // 我的课程-下级导航
                component: () => import ('@/views/Teacher/CoursesLayout'),
                redirect: '/MyCourses/CourseDetail',
                // 我的课程-子路由页面
                children: [
                    {
                        path: 'CourseDetail',
                        component: () => import ('@/views/Teacher/MyCourses/CourseDetail'),
                        name: 'CourseDetail',
                        meta: {
                            title: '我的课程'
                        }
                    },
                    {
                        path: 'CoursewareDetail',
                        component: () => import ('@/views/Teacher/MyCourses/CoursewareDetail'),
                        name: 'CoursewareDetail',
                        meta: {
                            title: '我的课程-学习课件'
                        },
                        hidden: true
                    },
                    {
                        path: 'CourseMaterialDetail',
                        component: () => import ('@/views/Teacher/MyCourses/CourseMaterialDetail'),
                        name: 'CourseMaterialDetail',
                        meta: {
                            title: '我的课程-备课材料'
                        },
                        hidden: true
                    },
                    {
                        path: 'CourseResourceDetail',
                        component: () => import ('@/views/Teacher/MyCourses/CourseResourceDetail'),
                        name: 'CourseResourceDetail',
                        meta: {
                            title: '我的课程-教学资源'
                        },
                        hidden: true
                    },
                    {
                        path: 'StuAttendance',
                        component: () => import ('@/views/Teacher/MyCourses/StuAttendance'),
                        name: 'StuAttendance',
                        meta: {
                            title: '我的课程-学生考勤'
                        },
                        hidden: true
                    },
                    //批阅
                    {
                        path: '/Marking',
                        component: () => import ('@/views/Teacher/MyCourses/Marking'),
                        name: 'Marking',
                        meta: {
                            title: '首页-我的课程-点击批阅'
                        }
                    },
                    {
                        path: '/StudentsSubmitDetailsList',
                        component: () => import ('@/views/Teacher/MyCourses/StudentsSubmitDetailsList'),
                        name: 'Marking',
                        meta: {
                            title: '首页-我的课程-点击批阅-学生提交详情-列表-实验'
                        }
                    },
                    // 考试
                    {
                        path: 'Examination',
                        component: () => import ('@/views/Teacher/ExaminationLayout'),
                        redirect: '/MyCourses/Examination/ExaminationList',
                        children: [
                            {
                                path: 'ExaminationList',
                                component: () => import ('@/views/Teacher/MyCourses/ExaminationList'),
                                name: 'ExaminationList',
                                meta: {
                                    title: '我的课程-考试列表'
                                }
                            },
                            {
                                path: 'TopicModel',
                                component: () => import ('@/views/Teacher/MyCourses/TopicModel'),
                                name: 'TopicModel',
                                meta: {
                                    title: '我的课程-考试-试卷-选题模式'
                                }
                            },
                            {
                                path: 'ItemBank',
                                component: () => import ('@/views/Teacher/MyCourses/ItemBank'),
                                name: 'ItemBank',
                                meta: {
                                    title: '我的课程-课程详情页面-题库'
                                }
                            },
                            {
                                path: 'SelectTemplate',
                                component: () => import ('@/views/Teacher/MyCourses/SelectTemplate'),
                                name: 'SelectTemplate',
                                meta: {
                                    title: '我的课程-考试-试卷-自动模式'
                                }
                            },
                            {
                                path: 'AfterSelectTemplate',
                                component: () => import ('@/views/Teacher/MyCourses/AfterSelectTemplate'),
                                name: 'AfterSelectTemplate',
                                meta: {
                                    title: '我的课程-考试-试卷-选题模式'
                                }
                            },
                            {
                                path: 'ExcelImport',
                                component: () => import ('@/views/Teacher/MyCourses/ExcelImport'),
                                name: 'ExcelImport',
                                meta: {
                                    title: '我的课程-考试-题库-Excel导入'
                                }
                            },
                            {
                                path: 'ItemBankImport',
                                component: () => import ('@/views/Teacher/MyCourses/ItemBankImport'),
                                name: 'ItemBankImport',
                                meta: {
                                    title: '我的课程-考试-题库-题库导入'
                                }
                            },
                            // 添加试题
                            {
                                path: 'AddChoice',
                                component: () => import ('@/views/Teacher/AddQuestionLayout'),
                                // 添加试题子路由
                                children: [{
                                        path: 'AddChoiceQuestion',
                                        component: () => import ('@/views/Teacher/MyCourses/AddChoiceQuestion'),
                                        name: 'AddChoiceQuestion',
                                        meta: {
                                            title: '我的课程-考试-题库-添加试题-选择题'
                                        }
                                    }, {
                                        path: 'AddJudge',
                                        component: () => import ('@/views/Teacher/MyCourses/AddJudge'),
                                        name: 'AddJudge',
                                        meta: {
                                            title: '我的课程-考试-题库-添加试题-判断题'
                                        }
                                    }, {
                                        path: 'AddFillInTheBlanks',
                                        component: () => import ('@/views/Teacher/MyCourses/AddFillInTheBlanks'),
                                        name: 'AddFillInTheBlanks',
                                        meta: {
                                            title: '我的课程-考试-题库-添加试题-填空题'
                                        }
                                    },
                                    {
                                        path: 'AddShortAnswerQuestions',
                                        component: () => import ('@/views/Teacher/MyCourses/AddShortAnswerQuestions'),
                                        name: 'AddShortAnswerQuestions',
                                        meta: {
                                            title: '我的课程-考试-题库-添加试题-简答题'
                                        }
                                    },
                                    {
                                        path: 'AddExperimental',
                                        component: () => import ('@/views/Teacher/MyCourses/AddExperimental'),
                                        name: 'AddExperimental',
                                        meta: {
                                            title: '我的课程-考试-题库-添加试题-实验题'
                                        }
                                    },
                                    {
                                        path: 'ApprovalTest',
                                        component: () => import ('@/views/Teacher/MyCourses/ApprovalTest'),
                                        name: 'ApprovalTest',
                                        meta: {
                                            title: '我的课程-考试列表-试题审批、答题历史'
                                        }
                                    },
                                ]

                            }
                        ]
                    },
                    //yx 课程统计
                    {
                        path: 'Statistics',
                        component: () => import ('@/views/Teacher/StatisticsLayout'),
                        redirect: '/MyCourses/Statistics/TStatistics',
                        children: [
                            {
                                path: 'TStatistics',
                                component: () => import ('@/views/Teacher/MyCourses/TStatistics'),
                                name: 'TStatistics',
                                meta: {
                                    title: '我的课程-统计-教学统计'
                                }
                            },
                            {
                                path: 'AttenceStatistics',
                                component: () => import ('@/views/Teacher/MyCourses/AttenceStatistics'),
                                name: 'AttenceStatistics',
                                meta: {
                                    title: '我的课程-统计-考勤统计'
                                }
                            },
                            {
                                path: 'ScoreStatistics',
                                component: () => import ('@/views/Teacher/MyCourses/ScoreStatistics'),
                                name: 'ScoreStatistics',
                                meta: {
                                    title: '我的课程-统计-成绩统计'
                                }
                            },
                            {
                                path: 'AskStatistics',
                                component: () => import ('@/views/Teacher/MyCourses/AskStatistics'),
                                name: 'AskStatistics',
                                meta: {
                                    title: '我的课程-统计-提问统计'
                                }
                            }
                         ]
                    },
                     //yx教师端 交流
                    {
                        path: 'Interflow',
                        component: () => import ('@/views/Teacher/CommitLayout'),
                        children: [
                            {
                                path: 'AnswerList',
                                component: () => import ('@/views/Teacher/MyCourses/AnswerList'),
                                name: 'AnswerList',
                                meta: {
                                    title: '我的课程-交流-问题列表'
                                }
                            },
                            {
                                path: 'AnswerListDetail',
                                component: () => import ('@/views/Teacher/MyCourses/AnswerListDetail'),
                                name: 'AnswerListDetail',
                                meta: {
                                    title: '我的课程-交流-问题列表详情'
                                }
                            },
                            {
                                path: 'MyAnswer',
                                component: () => import ('@/views/Teacher/MyCourses/MyAnswer'),
                                name: 'MyAnswer',
                                meta: {
                                    title: '我的课程-交流-我的回答'
                                }
                            },
                            {
                                path: 'MyAnswerDetail',
                                component: () => import ('@/views/Teacher/MyCourses/MyAnswerDetail'),
                                name: 'MyAnswerDetail',
                                meta: {
                                    title: '我的课程-交流-我的回答详情'
                                }
                            },
                            {
                                path: 'MyQuestion',
                                component: () => import ('@/views/Teacher/MyCourses/MyQuestion'),
                                name: 'MyQuestion',
                                meta: {
                                    title: '我的课程-交流-我的问题'
                                }
                            },
                           {
                                path: 'MyQuestionDetail',
                                component: () => import ('@/views/Teacher/MyCourses/MyQuestionDetail'),
                                name: 'MyQuestionDetail',
                                meta: {
                                    title: '我的课程-交流-我的问题详情'
                                }
                            },
                            {
                                path: 'ForbiddenMange',
                                component: () =>
                                    import ('@/views/Teacher/MyCourses/ForbiddenMange'),
                                name: 'ForbiddenMange',
                                meta: {
                                    title: '我的课程-交流-禁言管理'
                                }
                            },
                            {
                                path: 'CommunicatiSwitch',
                                component: () =>
                                    import ('@/views/Teacher/MyCourses/CommunicatiSwitch'),
                                name: 'CommunicatiSwitch',
                                meta: {
                                    title: '我的课程-交流-是否开启交流'
                                }
                            }
                        ]
                    },
                ]
            },

            // 我的课程end wty
            // 创作课程
            {
                path: 'CreativeCourse',
                component: () => import ('@/views/Teacher/CreativeCourse/CreativeCourse'),
                name: 'CreativeCourse',
                meta: {
                    title: '创作课程'
                }
            },
            // 实训环境
            {
                path: 'EnvironmentalTraining',
                component: () => import ('@/views/Teacher/EnvironmentalTraining/EnvironmentalTraining'),
                name: 'EnvironmentalTraining',
                meta: {
                    title: '环境实训'
                }
            },
            // 教学统计
            {
                path: 'TeachingStatistics',
                component: () => import ('@/views/Teacher/TeachingStatistics/TeachingStatistics'),
                name: 'TeachingStatistics',
                meta: {
                    title: '教学统计'
                }
            },
            // 文件查重
            {
                path: 'FileCheck',
                component: () => import ('@/views/Teacher/FileCheck/FileCheck'),
                name: 'FileCheck',
                meta: {
                    title: '文件查重'
                }
            }
        ]
    },
    //wwm
    {
        path: '/VirtualMachine',
        component: () => import('@/views/Teacher/MyCourses/VirtualMachine'),
        name: '虚机',
        hidden: true
    },
    //wwmend
    //wty
    // {
    //     path: '',
    //     component: () =>
    //         import ('@/views/Teacher/ExaminationApproval'),
    //     name: '考试批阅-不要了',
    //     hidden: true
    // },
    // {
    //     path: '/secondNav',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/SecondNav'),
    //     name: '二级导航',
    //     hidden: true
    // },
    //wty end
    // yxj
    // {
    //     path: '/courseDetail',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/CourseDetail'),
    //     name: 'CourseDetail',
    //     meta: {
    //         title: '我的课程'
    //     }
    // },
    // {
    //     path: '/coursewareDetail',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/CoursewareDetail'),
    //     name: '我的课程详情-学习课件',
    //     hidden: true
    // },
    // {
    //     path: '/courseMaterialDetail',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/CourseMaterialDetail'),
    //     name: '我的课程详情-备课材料',
    //     hidden: true
    // },
    // {
    //     path: '/courseResourceDetail',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/CourseResourceDetail'),
    //     name: '我的课程详情-教学资源',
    //     hidden: true
    // },
    {
        path: '/reportTemplate',
        component: () =>
            import ('@/views/Teacher/CreativeCourse/ReportTemplate'),
        name: '创作课程-报告模版',
        hidden: true
    },
    {
        path: '/makeCourseList',
        component: () =>
            import ('@/views/Teacher/CreativeCourse/MakeCourseList'),
        name: '创作课程-制作课程',
        hidden: true
    },
    {
        path: '/courseBaseInfo',
        component: () =>
            import ('@/views/Teacher/CreativeCourse/CourseBaseInfo'),
        name: '创作课程-基本信息',
        hidden: true
    },
    {
        path: '/chapterInfoList',
        component: () =>
            import ('@/views/Teacher/CreativeCourse/ChapterInfoList'),
        name: '创作课程-章节信息-列表',
        hidden: true
    },
    // {
    //     path: '/stuAttendance',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/StuAttendance'),
    //     name: '我的课程-学生考勤',
    //     hidden: true
    // },
    // yxj结束
    //wty
    {
        path: '/examinationApproval',
        component: () =>
            import ('@/views/Teacher/MyCourses/ExaminationApproval'),
        name: '教师端-课程详情页面-详情-考试-审批',
        hidden: true
    },
    // {
    //     path: '/_topicModel',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/TopicModel'),
    //     name: '我的课程-点击考试-生成试卷-选题模式',
    //     hidden: true
    // },
    // {
    //     path: '/afterSelectTemplate',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/AfterSelectTemplate'),
    //     name: '我的课程-点击考试-生成试卷-选择模板后',
    //     hidden: true
    // },
    // {
    //     path: '/selectTemplate',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/SelectTemplate'),
    //     name: '我的课程-点击考试-生成试卷-选择模板',
    //     hidden: true
    // },
    // {
    //     path: '/happyScrollDemo',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/HappyScrollDemo'),
    //     name: '滚动条插件测试demo',
    //     hidden: true
    // },
    // {
    //     path: '/addExperimental',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/AddExperimental'),
    //     name: '我的课程-考试-题库-添加试题-实验题',
    //     hidden: true
    // },
    // {
    //     path: '/startExam',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/StartExam'),
    //     name: '首页-点击考试-开始考试-单选题-答题情况',
    //     hidden: true
    // },
    // {
    //     path: '/previewTestPaper',
    //     component: () =>
    //         import ('@/views/Teacher/MyCourses/PreviewTestPaper'),
    //     name: '教师端-我的课程-点击考试-预览试卷',
    //     hidden: true
    // },
    // wty end

    //yx teacher统计
    {
        path: '/AnalysisTeacher',
        component: () =>
            import ('@/views/Teacher/TeachingStatistics/AnalysisTeacher'),
        name: '教学统计分析',
    },
    {
        path: '/AnalysisTeacherDetail',
        component: () =>
            import ('@/views/Teacher/TeachingStatistics/AnalysisTeacherDetail'),
        name: '教学统计分析-详情',
    },
    {
        path: '/StudentAnalysis',
        component: () =>
            import ('@/views/Teacher/TeachingStatistics/StudentAnalysis'),
        name: '学生统计分析',
    },
    {
        path: '/StudentAnalysisDetail',
        component: () =>
            import ('@/views/Teacher/TeachingStatistics/StudentAnalysisDetail'),
        name: '学生统计分析-详情',
    },
    {
        path: '/Setweight',
        component: () =>
            import ('@/views/Teacher/TeachingStatistics/Setweight'),
        name: '学生统计设置权重',
    },
    {
        path: '/PowerDEtail',
        component: () =>
            import ('@/views/Teacher/TeachingStatistics/PowerDEtail'),
        name: '学生统计能力详情',
    },
     //yx teacher 消息通知
     {
        path: '/TNotification',
        component: () => import ('@/views/Teacher/NotificationLayout'),
        children: [
            {
                path: '/Myinfomation',
                component: () =>
                     import ('@/views/Teacher/Notification/Myinfomation'),
                name: 'Myinfomation',
                meta: {
                    title: '基本信息'
                }
            },
            {
                path: '/TNotification',
                component: () => import ('@/views/Teacher/Notification/TNotification'),
                name: 'TNotification',
                meta: {
                    title: '消息通知'
                }
            },
            {
                path: '/Application',
                component: () =>
                     import ('@/views/Teacher/Notification/Application'),
                name: 'Application',
                meta: {
                    title: '申请账号'
                }
            },
            {
                path: '/ChangeCode',
                component: () =>
                     import ('@/views/Teacher/Notification/ChangeCode'),
                name: 'Application',
                meta: {
                    title: '修改密码'
                }
            },
            {
                path: '/ProblemBack',
                component: () =>
                     import ('@/views/Teacher/Notification/ProblemBack'),
                name: 'ProblemBack',
                meta: {
                    title: '问题反馈'
                }
            }
        ]
    },
    //管理员
    {
        path: '/AdminInfo',
        component: () =>
            import ('@/views/administrator/Admin/AdminInfo'),
        name: '管理员用户',
        hidden: true
    },
    {
        path: '/TeachingMange',
        component: () =>
            import ('@/views/administrator/TeachingMange/TeachingMange'),
        name: '教学管理',
        hidden: true
    },
    //互联网管理员
    {
        path: '/InternetTeachMange',
        component: () =>
            import ('@/views/InternetAdmin/TeachingMange/InternetTeachMange'),
        name: '互联网教师管理',
        hidden: true
    },
    {
        path: '/AccountFlow',
        component: () =>
            import ('@/views/InternetAdmin/TeachingMange/AccountFlow'),
        name: '互联网账号流水',
        hidden: true
    },
    // 学生端
    {
        path: '/SAnswerList',
        component: () =>
            import ('@/views/Student/MyCourses/SAnswerList'),
        name: '学生-问题列表',
        hidden: true
    },
    {
        path: '/SAnswerListDetail',
        component: () =>
            import ('@/views/Student/MyCourses/SAnswerListDetail'),
        name: '学生-问题列表详情',
        hidden: true
    },
    {
        path: '/SMyQuestionDetail',
        component: () =>
            import ('@/views/Student/MyCourses/SMyQuestionDetail'),
        name: '学生-我的问题详情',
        hidden: true
    },
    {
        path: '/SMyQuestion',
        component: () =>
            import ('@/views/Student/MyCourses/SMyQuestion'),
        name: '学生-我的问题',
        hidden: true
    },
    {
        path: '/SMyAnswer',
        component: () =>
            import ('@/views/Student/MyCourses/SMyAnswer'),
        name: '学生-我的回答',
        hidden: true
    },
    {
        path: '/SMyAnswerDetail',
        component: () =>
            import ('@/views/Student/MyCourses/SMyAnswerDetail'),
        name: '学生-我的回答详情',
        hidden: true
    }
    // yx结束
]
export default new Router({
    scrollBehavior: () => ({
        y: 0
    }),
    routes: constantRouterMap,
    mode: 'history',
    linkActiveClass: 'active-link',
    linkExactActiveClass: 'exact-active-link',
    fallback: true
})
